﻿Public Class Login

    ' TODO: Insert code to perform custom authentication using the provided username and password 
    ' (See http://go.microsoft.com/fwlink/?LinkId=35339).  
    ' The custom principal can then be attached to the current thread's principal as follows: 
    '     My.User.CurrentPrincipal = CustomPrincipal
    ' where CustomPrincipal is the IPrincipal implementation used to perform authentication. 
    ' Subsequently, My.User will return identity information encapsulated in the CustomPrincipal object
    ' such as the username, display name, etc.



    Private Sub Cancel_Click(sender As System.Object, e As System.EventArgs) Handles Cancel.Click
        Me.Close()
    End Sub

    Private Sub OK_Click(sender As System.Object, e As System.EventArgs) Handles OK.Click


        Dim a = Me.UsernameTextBox.Text
        Dim b = Me.PasswordTextBox.Text

        If a = "peter" And b = "sau" Then

            Dim mdi = New PrincipalMDI
            Me.Visible = False
            Cargando.Show()

        Else
            Me.UsernameTextBox.Text = ""
            Me.PasswordTextBox.Text = ""
            MsgBox("Usuario y/o clave incorectas")

        End If


    End Sub

    Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
